home *** CD-ROM | disk | FTP | other *** search
- global onIBM, gStartVolume, gmasterfolderpath, gDelimiter, gFileName, gGraphicPath, gSkipInit, gKiosk, gQuick, gQuitPict, gBookmark, theQTMovie, theBlitPict, theSparkle, objPreview, objIndexBtn, objalphabetbtn, objChapterBtn, objVolumeBtn, objCapturePict, objBookmark
-
- on startMovie
- set the exitLock to 1
- set the keyDownScript to "StdKeyDownScript"
- watchon()
- repeat with n = 1 to 48
- set the visible of sprite n to 0
- end repeat
- updateStage()
- go(1)
- watchon()
- openingupsetting()
- watchon()
- initialsetting()
- setMenu()
- setIndexBtn()
- watchon()
- go(2)
- end
-
- on keyDown
- StdKeyDownScript()
- end
-
- on StdKeyDownScript
- if the commandDown = 1 then
- dontPassEvent()
- end if
- end
-
- on playDoneMovie
- if objectp(theQTMovie) then
- QTPause(theQTMovie)
- QTDispose(theQTMovie)
- end if
- repeat with n = 1 to 48
- set the visible of sprite n to 0
- set the puppet of sprite n to 0
- end repeat
- updateStage()
- if gBookmark then
- mSaveBookMarkPreference(objBookmark)
- end if
- killpreview()
- killsparkle(theSparkle)
- killIndexBtn()
- if onIBM then
- closeXLib("FILEIO")
- closeXLib("BLITPICT")
- closeXLib("BATQT")
- end if
- end
-
- on stopMovieProcess
- if objectp(theQTMovie) then
- QTPause(theQTMovie)
- QTDispose(theQTMovie)
- end if
- repeat with n = 1 to 48
- set the visible of sprite n to 0
- set the puppet of sprite n to 0
- end repeat
- updateStage()
- if gQuitPict then
- importFileInto(cast 1, gGraphicPath & "QUIT.PCT")
- set the regPoint of cast 1 to point(the width of cast 1 / 2, the height of cast 1 / 2)
- go("logo")
- set the visible of sprite 1 to 1
- updateStage()
- startTimer()
- repeat while the timer < 120
- end repeat
- end if
- if gBookmark then
- mSaveBookMarkPreference(objBookmark)
- end if
- killpreview()
- killsparkle(theSparkle)
- killIndexBtn()
- if onIBM then
- closeXLib("Fileio")
- closeXLib("Blitpict")
- closeXLib("Batqt")
- end if
- set the soundLevel to gStartVolume
- clearGlobals()
- end
-
- on startOver
- repeat with n = 48 down to 1
- set the visible of sprite n to 0
- set the puppet of sprite n to 0
- end repeat
- updateStage()
- killpreview()
- if objectp(theQTMovie) then
- QTDispose(theQTMovie)
- end if
- killsparkle(theSparkle)
- killIndexBtn()
- set objPreview to EMPTY
- set theBlitPict to EMPTY
- set theSparkle to EMPTY
- set theQTMovie to EMPTY
- set objIndexBtn to EMPTY
- set objalphabetbtn to EMPTY
- set objChapterBtn to EMPTY
- set objVolumeBtn to EMPTY
- set objCapturePict to EMPTY
- if onIBM then
- closeXLib("Fileio")
- closeXLib("Blitpict")
- closeXLib("Batqt")
- end if
- put "." into field 32
- put "." into field 33
- put "." into field 34
- put "." into field 37
- put "." into field 35
- clearGlobals()
- unLoadCast()
- end
-
- on openingupsetting
- global gJPWinFont, glessonlist, glessonnumber, objChapterBtn, gChapterBtnLocList, objVolumeBtn, gVolumeBtnLocList, gallchapterlist, galllessonlist, gHelpChapter, gHelpParagraph, gKeywordDataList, gkeywordtext, gAlphabetExist
- set the exitLock to 1
- set the keyDownScript to "filterQuit"
- set gStartVolume to the soundLevel
- if the machineType = 256 then
- set onIBM to 1
- set gDelimiter to "\"
- set gFileName to [:]
- addProp(gFileName, #INITXT, "INI.TXT")
- addProp(gFileName, #PREVIEW, "PREVIEW.BMP")
- addProp(gFileName, #sparkle, "SPARKLE.BMP")
- addProp(gFileName, #INDEXBTN, "INDEXBTN.BMP")
- addProp(gFileName, #INTROP, "INTRO.BMP")
- addProp(gFileName, #INTROM, "INTRO.MOV")
- addProp(gFileName, #IFTXT, "IF.TXT")
- addProp(gFileName, #Alphabet, "ALPHADN.BMP")
- openXLib("Fileio")
- openXLib("Blitpict")
- openXLib("Batqt")
- set objPreview to birth(script "blitPict parent for MPC")
- set theBlitPict to birth(script "blitPict parent for MPC")
- set theSparkle to birth(script "sparkle parent for MPC")
- set theQTMovie to birth(script "batQT parent for MPC")
- set objIndexBtn to birth(script "blitPict parent for MPC")
- set objalphabetbtn to birth(script "blitPict parent for MPC")
- set objCapturePict to birth(script "blitPict parent for MPC")
- if not (the romanLingo) then
- set tTestTextCast to the number of cast "FontTest_TextField"
- set the textFont of cast tTestTextCast to "ÇlÇr ÇoÉSÉVÉbÉN"
- if the textFont of cast tTestTextCast = "ÇlÇr ÇoÉSÉVÉbÉN" then
- set gJPWinFont to "ÇlÇr ÇoÉSÉVÉbÉN"
- else
- set gJPWinFont to "ïWèÄÉSÉVÉbÉN"
- end if
- end if
- else
- set onIBM to 0
- set gDelimiter to ":"
- set gFileName to [:]
- addProp(gFileName, #INITXT, "INI.TXT")
- addProp(gFileName, #PREVIEW, "PREVIEW.PCT")
- addProp(gFileName, #sparkle, "SPARKLE.PCT")
- addProp(gFileName, #INDEXBTN, "INDEXBTN.PCT")
- addProp(gFileName, #INTROP, "INTRO.PCT")
- addProp(gFileName, #INTROM, "INTRO.MOV")
- addProp(gFileName, #IFTXT, "IF.TXT")
- addProp(gFileName, #Alphabet, "ALPHADN.PCT")
- set objPreview to birth(script "blitPict parent for Mac")
- set theBlitPict to birth(script "blitPict parent for Mac")
- set theSparkle to birth(script "sparkle parent for Mac")
- set theQTMovie to birth(script "QTMovie parent for Mac")
- set objIndexBtn to birth(script "blitPict parent for Mac")
- set objalphabetbtn to birth(script "blitPict parent for Mac")
- set objCapturePict to birth(script "blitPict parent for Mac")
- end if
- set initxtfile to fileIOread(the pathName & getProp(gFileName, #INITXT))
- if item 3 of line 1 of initxtfile = EMPTY then
- set external to 0
- else
- set external to integer(item 3 of line 1 of initxtfile)
- end if
- if onIBM then
- if the controlDown or (external <> 0) then
- set thePath to line 2 of initxtfile
- set the itemDelimiter to ":"
- openXLib("Labeldrv.dll")
- set objLabelDrv to LabelDrv(mnew)
- objLabelDrv(mSetRange, "A", "Z")
- set driveName to objLabelDrv(mGetDrive, item 1 of thePath)
- objLabelDrv(mdispose)
- closeXLib("Labeldrv.dll")
- set gmasterfolderpath to char 1 of driveName & ":\"
- repeat with n = 2 to the number of items in thePath - 1
- put item n of thePath & "\" after gmasterfolderpath
- end repeat
- set the itemDelimiter to ","
- else
- set thePath to line 2 of initxtfile
- set the itemDelimiter to ":"
- set thefoldername to item the number of items in thePath - 1 of thePath
- set gmasterfolderpath to the pathName & thefoldername & "\"
- set the itemDelimiter to ","
- end if
- else
- if the controlDown or (external <> 0) then
- set gmasterfolderpath to line 2 of initxtfile
- else
- set thePath to line 2 of initxtfile
- set the itemDelimiter to ":"
- set thefoldername to item the number of items in thePath - 1 of thePath
- set gmasterfolderpath to the pathName & thefoldername & ":"
- set the itemDelimiter to ","
- end if
- end if
- if onIBM then
- if item 5 of line 1 of initxtfile = EMPTY then
- set gGraphicPath to gmasterfolderpath & "GRAPHIC" & gDelimiter
- else
- set gGraphicPath to gmasterfolderpath & item 5 of line 1 of initxtfile & gDelimiter
- end if
- else
- if item 4 of line 1 of initxtfile = EMPTY then
- set gGraphicPath to gmasterfolderpath & "GRAPHIC" & gDelimiter
- else
- set gGraphicPath to gmasterfolderpath & item 4 of line 1 of initxtfile & gDelimiter
- end if
- end if
- set tFlag to item 6 of line 1 of initxtfile
- if (tFlag = EMPTY) or (tFlag = "0") then
- set gSkipInit to 0
- set gKiosk to 0
- else
- if tFlag = "1" then
- set gSkipInit to 1
- set gKiosk to 0
- else
- if tFlag = "2" then
- set gSkipInit to 0
- set gKiosk to 1
- end if
- end if
- end if
- set tFlag to item 7 of line 1 of initxtfile
- if (tFlag = EMPTY) or (tFlag = "0") then
- set gQuick to 0
- else
- if tFlag = "1" then
- set gQuick to 1
- end if
- end if
- fileIOread(gmasterfolderpath & "PREP1.TXT")
- set glessonlist to the result
- set glessonnumber to the number of lines in glessonlist
- set the text of cast 32 to glessonlist
- set objGraphic to birth(script "parent <change graphic>")
- importGraphic(objGraphic, external)
- set objGraphic to EMPTY
- set objChapterBtn to birth(script "Parent<Slider2>", gChapterBtnLocList, 13)
- set objVolumeBtn to birth(script "Parent<Slider2>", gVolumeBtnLocList, 14)
- slideListSet(objVolumeBtn, 8)
- fileIOread(gmasterfolderpath & "PREP2.TXT")
- set galllessonlist to getAt(value(the result), 1)
- set gallchapterlist to getAt(value(the result), 2)
- if gHelpChapter = 0 then
- set gHelpChapter to glessonnumber
- else
- if gHelpChapter > glessonnumber then
- set gHelpChapter to glessonnumber
- end if
- end if
- set theLastParagraph to getAt(getAt(galllessonlist, gHelpChapter), 2)
- if gHelpParagraph = 0 then
- set gHelpParagraph to theLastParagraph
- else
- if gHelpParagraph > theLastParagraph then
- set gHelpParagraph to theLastParagraph
- end if
- end if
- fileIOread(gmasterfolderpath & "PREP3.TXT")
- set gkeywordtext to the result
- fileIOread(gmasterfolderpath & "PREP4.TXT")
- set gKeywordDataList to getAt(value(the result), 1)
- set gAlphabetExist to getAt(value(the result), 2)
- end
-
- on initialsetting
- global gPauseMode, gcurrlessonnumber, gcurrchapternumber, gchapternumber, gstartupflag, theSparkle, gPICTQTList
- set gPauseMode to 1
- setpreview()
- set gcurrlessonnumber to 1
- set gcurrchapternumber to 1
- set gchapternumber to getchapternumber(gcurrlessonnumber)
- set gstartupflag to 1
- loadsparkle(theSparkle)
- set gPICTQTList to []
- set pictscreenlist to []
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 1, 1, 1, 0, 1])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 2])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 2])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 2])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 2])
- add(pictscreenlist, [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 2])
- set prevclrlist to []
- add(prevclrlist, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
- add(prevclrlist, [3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2])
- add(prevclrlist, [3, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2])
- add(prevclrlist, [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0])
- add(prevclrlist, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
- add(prevclrlist, [3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2])
- add(prevclrlist, [3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2])
- add(prevclrlist, [3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2])
- add(prevclrlist, [3, 1, 3, 2, 3, 1, 1, 1, 0, 1, 2, 0, 2, 2, 2])
- add(prevclrlist, [2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2])
- add(prevclrlist, [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0])
- add(prevclrlist, [3, 1, 3, 2, 3, 1, 1, 1, 0, 1, 2, 0, 2, 2, 2])
- add(prevclrlist, [3, 1, 1, 2, 3, 1, 1, 1, 0, 1, 2, 0, 0, 2, 2])
- add(prevclrlist, [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0])
- add(prevclrlist, [0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0])
- set smallscreenlist to [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0]
- set gPICTQTList to [pictscreenlist, prevclrlist, smallscreenlist]
- end
-
- on fileIOwrite thePath, theText
- if objectp(objfileio) then
- objfileio(mdispose)
- end if
- set objfileio to FileIO(mnew, "write", thePath)
- if objectp(objfileio) then
- objfileio(mWriteString, theText)
- objfileio(mdispose)
- else
- alert(thePath && "write error")
- end if
- end
-
- on fileIOread thePath
- if objectp(objfileio) then
- objfileio(mdispose)
- end if
- set objfileio to FileIO(mnew, "read", thePath)
- if objectp(objfileio) then
- set theText to objfileio(mReadFile)
- objfileio(mdispose)
- else
- alert(thePath && "read error")
- end if
- return theText
- end
-